<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('党员基本信息列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>党员编号：</label>
                                <input type="text" name="memberId"/>
                            </li>
                            <li>
                                <label>党员姓名：</label>
                                <input type="text" name="memberName"/>
                            </li>
                            <li>
                                <label>身份证号：</label>
                                <input type="text" name="card"/>
                            </li>
                            <li>
                                <label>出生年月日：</label>
                                <input type="text" maxlength="10" class="time-input" name="birthday"  placeholder="请选择出生年月日">
                                <!-- <input type="text" name="birthday"/> -->
                                
                            </li>
                            <li>
                                <label>政治生日：</label>
                                <!-- <input type="text" name="partyBirthday"/> -->
                                <input type="text" maxlength="10" class="time-input" name="partyBirthday" placeholder="请选择政治生日">
                            </li>
                            <li>
                                <label>行政级别：</label>
                                <select name="adminLevel" th:with="type=${@dict.getType('admin_level')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <label>党内职务：</label>
                                <select name="partyDuty" th:with="type=${@dict.getType('party_duty')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <label>所属党小组：</label>
                               <!--  <input type="text" name="orgGid"/> -->
                               <select id="orgDxz" name="orgGid">
									<option value="">请选择</option>
									<option th:each="orgDxz:${orgDxzs}" th:value="${orgDxz.orgId}"
										th:text="${orgDxz.orgName}"></option>
								</select>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('business:member:edit')}]];
        var removeFlag = [[${@permission.hasPermi('business:member:remove')}]];
        var adminLevelDatas = [[${@dict.getType('admin_level')}]];
        var partyDutyDatas = [[${@dict.getType('party_duty')}]];
        var orgId = [[${orgId}]];
        var prefix = ctx + "business/member";

        $(function() {
            var options = {
                url: prefix + "/listmembers/"+orgId,
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "党员基本信息",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'memberId',
                    title: '党员编号',
                    visible: true
                },
                {
                    field: 'memberName',
                    title: '党员姓名'
                },
                {
                    field: 'card',
                    title: '身份证号'
                },
                {
                    field: 'birthday',
                    title: '出生年月日'
                },
                {
                    field: 'partyBirthday',
                    title: '政治生日'
                },
                {
                    field: 'adminLevel',
                    title: '行政级别',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(adminLevelDatas, value);
                    }
                },
                {
                    field: 'partyDuty',
                    title: '党内职务',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(partyDutyDatas, value);
                    }
                },
                {
                   /*  field: 'orgId', */
                   	field: 'orgName',
                    title: '所属支部'
                },
                {
                    field: 'orgGname',
                   /*  field: 'orgGid', */
                    title: '所属党小组'
                }]
            };
            $.table.init(options);
            
        });
    </script>
</body>
</html>